package com.cfs.svcimpl.bz;

import java.util.List;

import com.cfs.dao.bz.RepairItemDao;
import com.cfs.po.bz.RepairItem;
import com.cfs.svc.bz.RepairItemService;
import com.cfs.vo.Condition;

public class RepairItemServiceImpl implements RepairItemService {

	private RepairItemDao dao;	
	
	public RepairItemDao getDao() {
		return dao;
	}

	public void setDao(RepairItemDao dao) {
		this.dao = dao;
	}

	public Long add(RepairItem r) {
		Long n = dao.insert(r);
		System.out.println("RETURN RepairItem NUM: " + n + " ID:" + r.getId() );
		return r.getId();
	}

	public int deleteById(Long id) {
		return dao.delete(id);
	}

	public List<RepairItem> list(Condition c) {
		return dao.list(c);
	}

	public Long update(RepairItem r) {
		return dao.update(r);
	}

	public RepairItem get(Long id) {
		return dao.get(id);
	}

	public List<RepairItem> list() {
		return dao.listAll();
	}



}
